package main

import "fmt"

func main()  {
	var total float32 = 100000
	var count int32 = 0

	for {
		if total < 1000 {
			fmt.Println("还剩", total, "，不够过路费")
			break
		}

		count ++
		if total > 50000 {
			total = total * 0.95
		} else {
			total -= 1000
		}
	}
	fmt.Printf("一共经过了%v个路口\n", count)
}